package com.silverbox.sweeporder.common;

import java.util.HashMap;
import java.util.Map;

public class Constants {
	
	public static enum Dict{
		ORERSTATUS("ORERSTATUS","订单状态"),
		SHOPPERCONFIG("ShopperConfig","店铺配置");
		
		private Dict(String value,String name){
            this.value=value;
            this.name=name;
        }
        private final String value;
        private final String name;
        
        public String getValue() {
            return value;
        }

        public String getName() {
            return name;
        }
    }
	
	public static enum ShopperConfig{
		CTR_APP_RECEIVE_SWEEPORDER("CTR_APP_RECEIVE_SWEEPORDER","商家APP是否承接扫码下单");
		
		private ShopperConfig(String value,String name){
            this.value=value;
            this.name=name;
        }
		private final String value;
        private final String name;
        
        public String getValue() {
            return value;
        }

        public String getName() {
            return name;
        }
	}
	/**
	 * 口碑推荐菜品类型
	 */
	public static enum KoubeiDishType {
		DESIGN_FOR_YOU("DESIGN_FOR_YOU","为你定制"),
		ASSOCIATION_RECOMAND("ASSOCIATION_RECOMAND","关联推荐"),
		QUICK_ORDER("QUICK_ORDER","一键下单 "),
		CART_RECOMAND("CART_RECOMAND","购物车菜品推荐 ");
		private final String value;
	   
		private final String name;
		
	    public String getValue() {
			return value;
		}
		public String getName() {
			return name;
		}
		private KoubeiDishType(String value, String name) {
			this.value = value;
			this.name = name;
		}
	}
	
	/**
	 *	客户端订单类型判断
	 * @author litao
	 *	2018年11月29日
	 */
	public static enum clientOrderMode{
        WAIMAI_ORDER_MODE(81,"外卖订单"),
        SCAN_ORDER_MODE(5, "扫码下单"),
        ONLINE_ORDER_MODE(4, "在线订单"),
        KOUBEI_DINNER_MODE(5,"口碑正餐");
		
		private Integer value;

		private String name;

		public Integer getValue() {
			return value;
		}

		public void setValue(Integer value) {
			this.value = value;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		private clientOrderMode(Integer value, String name) {
			this.value = value;
			this.name = name;
		}
		public static boolean getValue(int value){
			for(clientOrderMode mode:clientOrderMode.values()){
				if(mode.getValue()==value){
					return true;
				}
			}
			return false;
		}
		
	}
	
	/**
	 *	订单类型
	 * @author litao
	 *	2018年11月29日
	 */
	public static enum orderOutSupportId{
		SCAN_ORDER(5L, "扫码下单"), ONLINE_ORDER(4L, "在线订单"),
		KOUBEI_ORDER(103L,"口碑后付订单"),WAIMAI_ORDER(81L,"外卖订单");
		
		private Long value;

		private String name;

		public Long getValue() {
			return value;
		}

		public void setValue(Long value) {
			this.value = value;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		private orderOutSupportId(Long value, String name) {
			this.value = value;
			this.name = name;
		}
	}
	
	
	/**
	 * 订单状态
	 * @author litao
	 *	2018年11月29日
	 *
	 */
	public static enum orderStatus{
//		-1先付后吃已下单   0.待确认订单，1.商家已接单，2.商家拒单，3.加菜订单，5.退款中，6.已退款，7.拒绝退款 11，交易完成，12交易取消
		STATUS_MINUSONE(-1),
		STATUS_ZERO(0),
		STATUS_ONE(1),
		STATUS_TWO(2),
		STATUS_THREE(3),
//		STATUS_FOUR(4),
		STATUS_FIVE(5), 
		STATUS_SIX(6), 
		STATUS_SEVEN(7),
//		STATUS_EIGHT(8),
//		STATUS_NINE(9),
//		STATUS_TEN(10),
		STATUS_ELEVEN(11), 
		STATUS_TWELVE(12); 
		
		private Integer value;

		public Integer getValue() {
			return value;
		}

		public void setValue(Integer value) {
			this.value = value;
		}
		private orderStatus(Integer value) {
			this.value = value;
		}
	}
	
	/**
	 * 订单支付状态
	 * @author litao
	 *	2018年11月29日
	 *
	 */
	public static enum payStatus {
		// 0未付款 1已付款
		PAYSTATUS_ZERO(0), PAYSTATUS_ONE(1);
		private Integer value;

		public Integer getValue() {
			return value;
		}

		public void setValue(Integer value) {
			this.value = value;
		}

		private payStatus(Integer value) {
			this.value = value;
		}
	}
	
	/**
	 * 店铺配置的系统级商品id
	 * @author litao
	 *	2018年12月13日
	 *
	 */
	public static enum systemGoodsId{
		//test数据库系统级商品id
		FWF_GOODSID(70789681,"服务费"), CJF_GOODSID(453139,"餐具费"),DBH_GOODSID(453138,"打包盒");
		
		private Integer value;
		
		private String name;

		public Integer getValue() {
			return value;
		}

		public void setValue(Integer value) {
			this.value = value;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		private systemGoodsId(Integer value, String name) {
			this.value = value;
			this.name = name;
		}
		
	}
	/**
	 * 支付方式
	 * @author litao
	 *	2018年12月25日
	 *
	 */
	public static enum payModel {

        POINTS_PAY(30,"积分支付"),BLEND_PAY(50, "混合支付"),ANT_PAY(5201, "蚂蚁支付宝"), SAOBEI_PAY(8002, "微信扫呗"), ALIPAY(1, "支付宝支付"), WECAT_PAY(5202, "蚂蚁微信"),VIP_PAY(20,"会员支付");

		private Integer value;

		private String name;

		public Integer getValue() {
			return value;
		}

		public void setValue(Integer value) {
			this.value = value;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		private payModel(Integer value, String name) {
			this.value = value;
			this.name = name;
		}
	}
	/**
	 * 授权模式
	 * @author litao
	 *	2019年3月5日
	 *
	 */
	public static enum authMode{
		
		ALIPAY_AUTH(1,"支付宝授权"),WECHAT_AUTH(2,"微信授权"),ALIPAY_MINI_AUTH(0,"支付宝小程序授权");
		
		private Integer value;

		private String name;

		public Integer getValue() {
			return value;
		}

		public void setValue(Integer value) {
			this.value = value;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		private authMode(Integer value, String name) {
			this.value = value;
			this.name = name;
		}
	}

	public enum WaimaiOrderTime{
        YESTERDAY("昨天","-1"), TODAY("今天","0"), TOMORROW("明天","1")
        ;
        private String name;
        private String value;

        public String getValue() {
            return value;
        }

        public WaimaiOrderTime setValue(String value) {
            this.value = value;
            return this;
        }

        public String getName() {
            return name;
        }

        public WaimaiOrderTime setName(String name) {
            this.name = name;
            return this;
        }

        WaimaiOrderTime(String name,String value) {
            this.value = value;
            this.name = name;
        }

    }

    //会员价享受规则
    public enum SetGoodsUserVipPriceMode{
        AVERAGE_MEMBER("普通会员",1),
        VIP_MEMBER("付费会员",2),
        ;

        private String name;
        private Integer value;

        SetGoodsUserVipPriceMode(String name, Integer value) {
            this.name = name;
            this.value = value;
        }

        public String getName() {
            return name;
        }

        public Integer getValue() {
            return value;
        }
    }

    //系统布尔常量
    public enum Whether{
        TRUE(1,"是"),
        FALSE(0,"否"),
        ;
        private Integer value;
        private String name;

        Whether(Integer value, String name) {
            this.value = value;
            this.name = name;
        }

        public Integer getValue() {
            return value;
        }

        public String getName() {
            return name;
        }
    }

    //会员身份变更
    public enum PromoteMemberRule{
        SINGLE_ORDER(0,"单条订单"),
        ALL_ORDER(1,"全部订单"),
        ;

        private Integer value;
        private String name;

        PromoteMemberRule(Integer value, String name) {
            this.value = value;
            this.name = name;
        }

        public Integer getValue() {
            return value;
        }

        public String getName() {
            return name;
        }
    }
}
